package com.gimi.cloud.bbp.task.service.impl;

import com.gimi.cloud.bbp.dto.log.LogScheduleJobDTO;
import com.gimi.cloud.bbp.task.feign.LogScheduleFeignService;
import com.gimi.cloud.bbp.task.service.LogScheduleJobService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 定时任务相关日志实现类
 *
 * @author wbj
 * @version 1.0
 * @Description
 * @create 2018-01-08
 **/
@Service
public class LogScheduleJobServiceImpl implements LogScheduleJobService {
    private static final Logger logger = LoggerFactory.getLogger(LogScheduleJobServiceImpl.class);

    private LogScheduleFeignService logScheduleFeignService;

    @Autowired
    public LogScheduleJobServiceImpl(LogScheduleFeignService logScheduleFeignService) {
        this.logScheduleFeignService = logScheduleFeignService;
    }

    @Override
    public LogScheduleJobDTO saveLogScheduleJob(LogScheduleJobDTO logScheduleJobDTO) throws Exception {
        logScheduleFeignService.saveScheduleLog(logScheduleJobDTO);
        return logScheduleJobDTO;
    }
}
